
package fr.cnam.ratpProject.client;

import com.google.gwt.activity.shared.Activity;
import com.google.gwt.activity.shared.ActivityMapper;
import com.google.gwt.place.shared.Place;

import fr.cnam.ratpProject.client.activities.home.HomeActivity;
import fr.cnam.ratpProject.client.activities.home.HomePlace;
import fr.cnam.ratpProject.client.activities.itinarySearch.ItinarySearch;
import fr.cnam.ratpProject.client.activities.itinarySearch.ItinarySearchPlace;
import fr.cnam.ratpProject.client.activities.lineMap.LineMap;
import fr.cnam.ratpProject.client.activities.lineMap.LineMapPlace;
import fr.cnam.ratpProject.client.activities.searchStation.SearchStation;
import fr.cnam.ratpProject.client.activities.searchStation.SearchStationPlace;
import fr.cnam.ratpProject.client.activities.searchStation.ShowStation;
import fr.cnam.ratpProject.client.activities.searchStation.ShowStationPlace;


/**
 * 
 */
public class PhoneActivityMapper implements ActivityMapper {

//	private final ClientFactory clientFactory;
//
//	public PhoneActivityMapper(ClientFactory clientFactory) {
//		this.clientFactory = clientFactory;
//	}

	@Override
	public Activity getActivity(Place place) {
		if(place instanceof HomePlace)
			return new HomeActivity();
		if(place instanceof SearchStationPlace)
			return new SearchStation();
		if(place instanceof ShowStationPlace)
			return new ShowStation();
		if(place instanceof LineMapPlace)
			return new LineMap();
		if(place instanceof ItinarySearchPlace)
			return new ItinarySearch();
		return null;
	}
}
